import styles from './index.module.less'
import { Icon } from '@chatui/core'
const GuessAsking = ({ data, ctx }) => {
	console.log('ctx1', ctx.JSBridge.detect())
	const handleSend = (value) => {
		ctx.postMessage({ type: 'text', content: { text: value.text } })
	}
	return (
		<div className={styles.container}>
			<div className={styles.guessLeft}></div>
			<ul className={styles.guessRight}>
				{data.list.map((item, index) => {
					return (
						<li className={styles.guessItem} key={index} onClick={() => handleSend(item)}>
							<span className={styles.itemText}>{item.text}</span>
							<Icon className={styles.itemIcon} type='chevron-right' />
						</li>
					)
				})}
			</ul>
		</div>
	)
}
export default GuessAsking
